import React from 'react';
import style from './style.styl';
import cx from 'classnames';

class ConverCell extends React.Component {
  constructor(props) {
    super(props);
    this.displayName = 'ConverCell';
  }
  render() {
    const {
      data,
      render,
      disabled,
      disabledRender,
    } = this.props;
    return (
      <div className={style['cell']}>
        {disabled && disabledRender ? null : render ? render(data): data}
        {
          disabled ? 
            <div className={style['cell-dis']}>
              {disabledRender ? disabledRender(data): ''}
            </div>
          : null
        }
      </div>
    );
  } 
}

export default ConverCell;
